<template>
	<view>
		<view class="nav">
			<uni-nav-bar left-icon="back" @clickLeft="$tab.back()" :fixed="false" :border="false" :status-bar="true"
				background-color="transparent"></uni-nav-bar>
		</view>

		<view class="" style="height: 320rpx;">
		</view>
		
		<view class="px-20 py-32">
			<image :src="globalConfig.imagePrefix + item.iconUrl" mode="widthFix" v-for="(item,index) in list" :key="index" class="w-full mt-16" @click="$tab.nav(`/pages/commodity/list?title=${item.name}&columnType=5&preType=${item.id}`)"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				globalConfig:getApp().globalData.config,
				list:[]
			};
		},
		onLoad() {
			this.getData()
		},
		methods: {
			async getData() {
				const res = await this.$Api.common.typeChildrenAll({
					code: 'FUHUA'
				})
				console.log(res)
				this.list = res.data
			}
		}
	}
</script>

<style lang="scss">
	.nav {
		width: 100%;
		height: 320rpx;
		background: url(https://file.fulewanjia.com/fulewanjia/profile/appImages2/img_pinpaizhuanqu@2x.png) no-repeat;
		background-size: 100% 100%;
		position: fixed;
		left: 0;
		top: 0;
	}
</style>